<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>确认订单-${setting.name}</title>
    [#include "common/include.ftl"]
    <link rel="styleSheet" href="${base}/resource/css/cart.css">
    <link type="text/css" rel="styleSheet" href="${base}/resource/css/member.css">
	<link type="text/css" rel="styleSheet" href="${base}/resource/css/member-module.css">
	<script type="text/javascript" src="${base}/resource/js/address.module.js"></script>
	<script type="text/javascript" src="${base}/resource/plug/citySelect/jquery.cityselect.js"></script>
    <script type="text/javascript" src="${base}/resource/js/confirm.js"></script>
</head>
<body class="customer">
<div class="top w1">
	[#include "/common/header-top.ftl"/]
	<div class="top-search w">
		<div id="header-logo">
			<a href="${base}/index.jhtml">
				<img src="[@Pic pic=setting.logo/]" height="60" width="200">
			</a>
		</div>
		<div id="cart-step">
			<div class="step step2"></div>
		</div>
		<div class="clear"></div>
	</div>
</div>
<div id="P_confirm">
    <div id="P_main">
        <form id="createOrderForm" action="${base}/order/create.jhtml" method="post">
            <input type="hidden" name="token" value="${token}"/>
            <input type="hidden" name="weight" value="${info.weight}"/>
            <div class="mt">
                <h2>填写并核对订单信息</h2>
            </div>
            <div class="step-title">
                <h3>收货人信息</h3><a class="add-new-address" href="javascript:">新增收货地址</a>
            </div>
            <div class="step-cont">
                <input type="hidden" name="receiverId">
                <div class="address-list">
                    <ul>
                    [#if info?? && info.receivers?has_content]
                        [#list info.receivers as receiver]
                            <li data-id="${receiver.id}" class="address-box [#if receiver.isDefault]default[/#if]">
                                <div class="step-tag [#if receiver.isDefault]default[/#if]">
                                    <span alias="${receiver.alias}">
                                        [#if receiver.isDefault]
                                            默认地址
                                        [#elseif receiver.alias?? && receiver.alias?trim !='']
                                            ${(receiver.alias)}
                                        [#else]
                                            ${receiver.name}
                                        [/#if]</span><b></b>
                                </div>

                                <div class="address-detail">
                                    <span class="addr-name">${receiver.name}</span>
                                    <span class="addr-info">${receiver.area} ${receiver.address}</span>
                                    <span class="addr-tel">${receiver.contact}</span>
                                </div>
                                <div class="op-btns">
                                    <a data="${receiver?html}" class="edit-address" href="javascript:;">编辑</a>
                                    <a class="del-address" href="javascript:;">删除</a>
                                [#if !receiver.isDefault]
                                    <a class="set-default" href="javascript:;">设为默认地址</a>
                                [/#if]
                                </div>
                            </li>
                        [/#list]
                    [/#if]
                        <li>
                            <div id="more-address" class="step-tag"><span>更多地址</span></div>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="step-title">
                <h3>支付方式</h3>
            </div>
            <div class="step-cont">
                <input type="hidden" name="payType">
                <div class="pay-list" id="payMethod">
                    <div data-val="cashOnDelivery" class="step-tag default"><span>余额支付</span></div>
                    <div data-val="onlinePayment" class="step-tag"><span>在线支付</span></div>
                    <div data-val="wftalipaysm" class="step-tag"><span>支付宝扫码</span></div>
                    <div data-val="wftweixinsm" class="step-tag"><span>微信扫码</span></div>
                </div>
            </div>
            <div class="step-title">
                <h3>配送方式</h3>
            </div>
            <div class="step-cont">
                <input type="hidden" name="deliveryMethodId">
                <div class="pay-list" id="deliveryMethod">
                </div>
            </div>
            <div class="step-title">
                <h3>送货清单</h3><a href="javascript:history.back();">返回购物车</a>
            </div>
            <div class="step-cont">
                <div class="shopping-list">
                    <table>
                        <tr>
                            <th width="100">&nbsp;</th>
                            <th width="500">商品名称</th>
                            <th width="150">规格</th>
                            <th width="100">单价</th>
                            <th>数量</th>
                            <th>合计</th>
                        </tr>
                    [#assign total=0/]
                    [#if itemList?has_content]
                        [#list itemList as item]
                        [#assign total = total + item.subtotal/]
                        <tr>
                            <td class="p-img">
                                <a href="${base}/goods/${item.goodsId}.jhtml" title="${item.productName}" target="_blank"><img class="lazy" data-original="[@Pic pic=item.image postfix="100x100" /]" postfix="100x100" width="100" height="100"></a>
                            </td>
                            <td class="p-name"><a href="${base}/goods/${item.goodsId}.jhtml" target="_blank">${item.productName}</a></td>
                            <th>${item.spec}</th>
                            <td class="price">${currency(item.price, true)}</td>
                            <td>${item.quantity}</td>
                            <td>${currency(item.subtotal,true)}</td>
                        </tr>
                        [/#list]
                    [#elseif goods??]
                    	[#assign total = goods.price*quantity/]
                        <tr>
                            <td class="p-img">
                                <a href="${goods.path}" title="${goods.name}" target="_blank"><img class="lazy" data-original="[@Pic pic=goods.image_default postfix="100x100" /]" postfix="100x100" width="100" height="100"></a>
                            </td>
                            <td class="p-name"><a href="${goods.path}" target="_blank">${goods.name}</a></td>
                            <th>${goods.spec}</th>
                            <td class="price">${currency(goods.price, true)}</td>
                            <td>${quantity}</td>
                            <td></td>
                        </tr>
                    [#else]

                    [/#if]
                    </table>
                </div>
            </div>
            <div class="step-cont mt20">
                <div class="statis-list fr">
                    <div class="list"><span><i>[#if itemList?has_content]${itemList?size}[#elseif goods??]1[/#if]</i>件商品，总商品金额：</span><em>${currency(total, true)}</em></div>
                    <div class="list"><span>运费：</span><em id="shipFee">￥0.00</em></div>
                    <div class="list"><span>应付总额：</span><em id="totalAmount">￥12998.40</em></div>
                </div>
                <div class="clear"></div>
            </div>
            <div id="F-b-btn" class="step-tit pay-action"><a class="hp-button">提交订单</a>

                <p><span class="text">提交订单应付总额：</span><strong class="total-amount">￥12998.40</strong></p>

                <div class="clear"></div>
            </div>
        </form>
         <div class="tips" style="font-size: 18px;line-height: 30px; padding: 0 5px;border: 1px solid #e5debc; background-color: #fff7d1;"><strong>[重要提示]：</strong><span> 申请退换货流程时，如将当时购物所赠送的积分使用或部分使用，则该商品不能申请退货，只能换货。




     </span><i></i></div>
    </div>

    <div id="F-payAction">
        <div class="p-bg"></div>
        <div class="pay-action"><a class="hp-button">提交订单</a>

            <p><span class="text">提交订单应付总额：</span><strong class="total-amount">￥12998.40</strong></p>

            <div class="clear"></div>
        </div>
    </div>
</div>
[#include "common/footer-slidebar-lazyload.ftl"]
<!-- 新增收货地址-->
<div id="edit-cont">
	<div class="mc">
		<div class="form">
			<input type="hidden" value="0" class="id">
			<div class="item">
				<div class="label">
					<em>*</em><span>收货人</span>
				</div>
				<div class="fl">
					<input type="text" class="text name">
					<span class="error-msg"></span>
				</div>
				<div class="clear"></div>
			</div>
			<div class="item">
				<div class="label">
					<em>*</em><span>所在地区</span>
				</div>
				<div id="element_id" class="fl">
					<select data-first-title="请选择" data-first-value='0' class="sele prov"></select>
					<select data-first-title="请选择" data-first-value='0' class="sele city"></select>
					<select data-first-title="请选择" data-first-value='0' class="sele dist"></select><span class="error-msg"> </span>
				</div>
				<div class="clear"></div>
			</div>
			<div class="item">
				<div class="label">
					<em>*</em><span>详细地址</span>
				</div>
				<div class="fl">
					<input type="text" name="" class="text text1 address">
					<span class="error-msg"></span>
				</div>
				<div class="clear"></div>
			</div>
			<div class="item">
				<div class="label">
					<em>*</em><span>手机号码</span>
				</div>
				<div class="fl">
					<input type="text" name="contact" class="text phone">
					<span class="error-msg"> </span>
				</div>
				<div class="clear"></div>
			</div>
            <div class="item">
				<div class="label">
					<span>邮编</span>
				</div>
				<div class="fl">
					<input type="text" name="contact" class="text zipCode">
					<span class="error-msg"> </span>
				</div>
				<div class="clear"></div>
			</div>

			<div class="item">
				<div class="label">
					<span>地址别名</span>
				</div>
				<div class="fl">
					<input type="text" class="text alias" value="">
					<span>设置一个易记的名称，如：“送到家里”、“送到公司”</span>
				</div>
				<div class="clear"></div>
			</div>
		</div>
	</div>
</div>
<!--地址项模版-->
<script id="address-item" type="text/html">
	<li data-id="{{id}}" class="address-box" style="display: list-item">
        <div data-id="{{id}}" class="step-tag default">
        	<span alias="{{alias}}">{{if alias!=''}} {{alias}} {{else}} 地址 {{/if}}</span><b></b>
        </div>
        <div class="address-detail">
            <span class="addr-name">{{name}}</span>
            <span class="addr-info">{{category}} {{address}}</span>
            <span class="addr-tel">{{phone}}</span>
        </div>
        <div class="op-btns">
        	<a data="{{data}}" class="edit-address" src="javascript:;">编辑</a>
        	<a class="del-address" src="javascript:;">删除</a>
            <a class="set-default" src="javascript:;">设为默认地址</a>
        </div>
    </li>
</script>

<script type="text/javascript">
	var total = "${total}";
</script>

<!--配送方式模版-->
<script id="delivery-method" type="text/html">
    {{each list}}
        <div data-id="{{$value.id}}" data-fee="{{$value.fee}}" class="step-tag {{if $value.isDefault}}default{{/if}}"><span>{{$value.name}}</span></div>
    {{/each}}
</script>


</body>
</html>